<?php

//echo "hello world\n---------------------------------\n";

$query    = "select COUNT(*) as cnt FROM UsenetRawGroupInfo"; 
$query    = "select COUNT(*) as cnt FROM UsenetRawGroupInfo WHERE Subject LIKE '%sonja%' ";
//query    = "select DatePosted as cnt FROM UsenetRawGroupInfo ORDER BY DatePosted DESC LIMIT 1";
$server   = '127.0.0.1';
$user     = 'root';
$password = 'active';
$database = 'NNTP';

MYSQL_CONNECT ($server, $user, $password) or die ("Server '$server' unreachable");
MYSQL_SELECT_DB ($database) or die ("Database '$database' unreachable");

$result = MYSQL_QUERY ($query);

echo $query . "\n--------------------\n";


while ($row = mysql_fetch_assoc($result)) {
    echo $row["cnt"] . " rows found.\n--------------------\n"; 
}



MYSQL_CLOSE();




?>
